<?$this->load->library('form_validation');?>
<div class="container">
	<div class="module mod-line-top">
	<?=validation_errors('<div class="alert alert-danger">', '</div>'); ?>
	<?php
	if(isset($message) && $message){
		echo '<div class="alert alert-success">'.$message.'</div>';
	}
	?>
	<form id="level-form" name="level-form" action="<?=site_url('admin/level/edit/'.$level['id'])?>" method="post">
		<h2>Edit Level</h2>
		
		<div class="row">
			<div class="form-group col-md-6">
				<label>Name</label>
				<input class="form-control" maxlength="100" name="l_name" type="text" value="<?=set_value('q_title', $level['level_name'])?>">	
			</div>
		</div>
		
		<div class="row">
			<div class="form-group col-md-6">
				<label>Description</label>
				<input class="form-control" maxlength="100" name="l_desc" type="text" value="<?=set_value('q_title', $level['description'])?>">	
			</div>
		</div>
		<div class="form-actions">
			<button type="submit" class="btn btn-primary">Submit</button>
			<button class="btn btn-primary" data-toggle="modal" data-target="#qModal">
				Select Questions
			</button>
	  		<button type="reset" class="btn btn-default">Reset</button>
		</div>
	</form>
	</div>
</div>

<!-- Modal -->
<div class="modal fade" id="qModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Question List</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

